//
//  MultipleImagePickerViewController.h
//  YCSchool
//
//  Created by yanglinxia on 16/5/3.
//  Copyright © 2016年 yanglinxia. All rights reserved.
//  多图片选择视图控制器

#import <UIKit/UIKit.h>

///回调图片原图key
extern NSString const * MutipleOriginImageKey;
///回掉图片缩略图key
extern NSString const * MutipleThumbnailKey;

/**
 *  选择图片完成回调
 *
 *  @param result 图片字典数组
 */
typedef void (^ MultipleImagePickerControllerCompletionBlock)(NSArray *result);

/**
 *  取消选择回调
 */
typedef void (^ MultipleImagePickerControllerCancelBlock)();

@class ALAssetsGroup;


@interface MultipleImagePickerViewController : UIViewController

/**
 *  呈现多图选择器
 *
 *  @param viewController    被呈现的视图控制器
 *  @param maxNumberOfImages 最多可以选择的图片数量(无限制可以传入NSUIntegerMax)
 *  @param completion        完成回调
 *  @param cancel            取消回调
 */
+ (void)presentMutipleImagePickerControllerAtViewController:(UIViewController *)viewController
                                          maxNumberOfImages:(NSUInteger)maxNumberOfImages
                                                 completion:(MultipleImagePickerControllerCompletionBlock)completion
                                                     cancel:(MultipleImagePickerControllerCancelBlock)cancel;

/**
 *  初始化多图选择视图控制器
 *
 *  @param group             图片资源组
 *  @param maxNumberOfImages 最多可以选择的图片数量(无限制可以传入NSUIntegerMax)
 *  @param completion        完成回调
 *  @param cancel            取消回调
 *
 *  @return 视图控制器对象
 */
- (instancetype)initWithAssetGroup:(ALAssetsGroup *)group
                 maxNumberOfImages:(NSUInteger)maxNumberOfImages
                        completion:(MultipleImagePickerControllerCompletionBlock)completion
                            cancel:(MultipleImagePickerControllerCancelBlock)cancel;

@end
